home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
hypercrd
/
hc1_2_x
/
almanac1.sit
/
Almanac 1.82.sit
/
Almanac
/
card_7837.txt
< prev
next >
Wrap
Text File
|
1990-04-21
|
8KB
|
309 lines
-- card: 7837 from stack: in
-- bmap block id: 8910
-- flags: 0000
-- background id: 2765
-- name: Moon
----- HyperTalk script -----
on fetchOcc he
global oldit,she,today,total,force
-- Hard Disk:Astronomy:Oc-1990
if not total then exit fetchOcc
put false into npath
get the script of cd "Moon"
put line 3 of it into path
repeat until number of chars of line 3 of it > 6 and the commandKey is up
put "Select file for Lunar Occultation Predictions..."
put filename("TEXT") into path
if path is empty then exit repeat
put " -- "&path into line 3 of it
set script of cd "Moon" to it
put true into npath
end repeat
hide message box
put empty into oldit
put 2 into las
put false into done
if he is empty then exit fetchOcc
put word 1 of he && word 2 of he into she
get char 2 of word 2 of last line of cd fld totalOcc
if it is "/" then subtract 1 from las
put word 1 of last line of cd fld totalOcc && char 1 to las of word 2 of last line of cd fld totalOcc into today
if not((today is in she) and (she is in today)) or npath or force then
-- import text
if number of chars of he=5 then put space after char 3 of he
if the shiftKey is up and number of lines of cd fld totalOcc Γëá 0 then
select text of cd fld totalOcc
doMenu "Clear Text"
end if
if "--" is in path then delete char 1 to 5 of path
open file path
put the ticks into t0
repeat
set cursor to busy
read from file path until "&"
if it is empty then
exit repeat
end if
delete last char of it
if it contains he then
exit repeat
else
-- put he && char 6 to 7 of line 3 of it
if first word of he is in it and second word of he< char 6 to 7 of line 3 of it then
put true into done
exit repeat
end if
end if
put it into oldit
end repeat
if done then
close file path
put " No totals for this date." into line 4 of cd fld totalOcc
exit fetchOcc
end if
close file path
put the ticks into t1
put number of lines of oldit into nlines
put 0 into prevday
if getday(it)-getday(oldit)=1 then
repeat with i=3 to nlines
if char 9 to 10 of line i of oldit >=20 then
put i into oldi
repeat with i=oldi to nlines
put "*" into char 1 of line i of oldit
end repeat
put return & line oldi to nlines of oldit after line 2 of it
exit repeat
end if
end repeat
end if
if hilite of button "Filter >=" then
put the number of lines of it into num
if num=0 then exit fetchOcc
put line 1 to 2 of it & return into cd fld totalOcc
repeat with i=3 to num
if (char 16 of line i of it)>=char 1 of cd fld Filter then
put line i of it & return after cd fld totalOcc
end if
end repeat
put 1 into j
else
put it after cd fld totalOcc
put -1 into j
end if
get the number of lines of cd fld totalOcc
if it > 0 then put " (" & it-3+j && "totals)" after line 1 of cd fld totalOcc
put " "& rnd10((t1-t0)/60) &" s." after line 1 of cd fld totalOcc
find "STAR"
repeat until ": " is not in cd fld totalOcc
find string ": "
put "put ""e&":0""e&&"into" && the foundChunk into command
do command
end repeat
end if
ftype "totalOcc",7
end fetchOcc
function getday arg
get char 6 to 7 of line 3 of arg
return it
end getday
on openCard
global total
if total then set textFont of cd fld totalOcc to Courier
pass openCard
end openCard
-- part 9 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=92 top=313 right=334 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Tomorrow
----- HyperTalk script -----
on mouseUp
global doo
put 1 into doo
put char 1 to 3 of second word of nDate(1,12,1) && first word of nDate(1,12,1) into he
fetchOcc he
put 0 into doo
end mouseUp
-- part 14 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=38 top=171 right=285 bottom=396
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 15036
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: TotalOcc
-- part 15 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=6 top=313 right=334 bottom=87
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Today
----- HyperTalk script -----
on mouseUp
put char 1 to 3 of second word of nDate(1,12,0) && first word of nDate(1,12,0) into he
fetchOcc he
end mouseUp
-- part 16 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=290 top=313 right=334 bottom=371
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Other Days
----- HyperTalk script -----
on mouseUp
Ask "Enter date (mon dd):"
put it into he
fetchOcc he
end mouseUp
-- part 17 (button)
-- low flags: 00
-- high flags: C006
-- rect: left=42 top=114 right=133 bottom=119
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Filter >=
----- HyperTalk script -----
on mouseUp
global doo,dodoo
set hilite of me to not hilite of me
put 1 into dodoo
send mouseUp to btn today
put 0 into dodoo
end mouseUp
-- part 18 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=110 top=114 right=131 bottom=138
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Filter
-- part 19 (button)
-- low flags: 00
-- high flags: 0004
-- rect: left=179 top=304 right=342 bottom=224
-- title width / last selected line: 0
-- icon id / first selected line: 15844 / 15844
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Print
----- HyperTalk script -----
on mouseUp
printField cd fld 1,"Courier"
end mouseUp
-- part contents for background part 7
----- text -----
Sidereal Time = 5:19
5.321728
-- part contents for background part 6
----- text -----
Universal Time = 20:55
20.933333
7:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
-- part contents for background part 31
----- text -----
Julian Date = 2448003.372
-- part contents for background part 14
----- text -----
Occult.
-- part contents for background part 28
----- text -----
22 April 1990 (JT)
-- part contents for background part 39
----- text -----
99%-
-- part contents for card part 18
----- text -----
3
-- part contents for background part 13
----- text -----
Moon Rises at 4:30 AM
Moon Sets at 4:30 PM
58.232809
4.5125367
16.5044251
4/21/90
-- part contents for background part 10
----- text -----
Moon R.A. = 23h 02m
Moon Dec. = -3┬░ 05'
below W horizon
345.7333937
-3.0910991
-- part contents for card part 14
----- text -----
RATING FOR APR 22 = .09 (1 totals) 4 s.
DATE T(UT) PR STAR # MAG PCT MN SN CA
APR 22/10:16 R3 X31710 8.8 11- 14 -9 36S